package com.linln.modules.ticket.repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.linln.modules.ticket.domain.Ticket;
import com.linln.modules.ticket.domain.TicketCustomerOriginal;
import com.linln.modules.ticket.domain.TicketLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import javax.validation.constraints.Null;
import java.util.List;
import java.util.Map;


/**
 * @author : pengliang
 * @version V1.0
 * @Project: timo
 * @Package com.linln.modeles.ticket.repository
 * @Descriptio /**
 * @Project: timo
 * @Package com.linln.modeles.ticket.repository
 * @Description: TODO
 * @date Date : 2020年11月23日 13:43
 */
@Mapper
@Component("ticketMapper")
public interface TicketMapper extends BaseMapper<Ticket> {
    List<Ticket> getTicket(@Param("userId") Long userId, @Param("status") Integer status);

    Ticket getTicketInfo(@Param("ticketId") String ticketId,@Param("ticketCode") String ticketCode);

    boolean updateTicketStatus(@Param("ticketId") String ticketId, @Param("status") Integer status);

    Integer getAllTicketCount(@Param("userId") Long userId);

    List<TicketLog> getVerificationRecord(@Param("shopId") String shopId,@Param("date") String date);

    boolean insertBatch(@Param("ticketList") List<Ticket> ticketList);

    TicketCustomerOriginal selectTicketCustomerOriginalByUserPhone(@Param("phone") String phone);

    boolean checkExpire();


    List<TicketLog> getTicketLogList(@Param("shopId") String shopId,@Param("startDate") String startDate,@Param("endDate") String endDate);
}
